In [ ]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
In [ ]:
data = pd.read_csv('WA_Fn-UseC_-HR-Employee-Attrition.csv')
data.head()
Out[ ]:
Age Attrition BusinessTravel DailyRate Department DistanceFromHome Education EducationField EmployeeCount EmployeeNumber ... RelationshipSatisfaction StandardHours StockOptionLevel TotalWorkingYears TrainingTimesLastYear WorkLifeBalance YearsAtCompany YearsInCurrentRole YearsSinceLastPromotion YearsWithCurrManager
0 41 Yes Travel_Rarely 1102 Sales 1 2 Life Sciences 1 1 ... 1 80 0 8 0 1 6 4 0 5
1 49 No Travel_Frequently 279 Research & Development 8 1 Life Sciences 1 2 ... 4 80 1 10 3 3 10 7 1 7
2 37 Yes Travel_Rarely 1373 Research & Development 2 2 Other 1 4 ... 2 80 0 7 3 3 0 0 0 0
3 33 No Travel_Frequently 1392 Research & Development 3 4 Life Sciences 1 5 ... 3 80 0 8 3 3 8 7 3 0
4 27 No Travel_Rarely 591 Research & Development 2 1 Medical 1 7 ... 4 80 1 6 3 3 2 2 2 2

5 rows × 35 columns

In [ ]:
data.tail()
Out[ ]:
Age Attrition BusinessTravel DailyRate Department DistanceFromHome Education EducationField EmployeeCount EmployeeNumber ... RelationshipSatisfaction StandardHours StockOptionLevel TotalWorkingYears TrainingTimesLastYear WorkLifeBalance YearsAtCompany YearsInCurrentRole YearsSinceLastPromotion YearsWithCurrManager
1465 36 No Travel_Frequently 884 Research & Development 23 2 Medical 1 2061 ... 3 80 1 17 3 3 5 2 0 3
1466 39 No Travel_Rarely 613 Research & Development 6 1 Medical 1 2062 ... 1 80 1 9 5 3 7 7 1 7
1467 27 No Travel_Rarely 155 Research & Development 4 3 Life Sciences 1 2064 ... 2 80 1 6 0 3 6 2 0 3
1468 49 No Travel_Frequently 1023 Sales 2 3 Medical 1 2065 ... 4 80 0 17 3 2 9 6 0 8
1469 34 No Travel_Rarely 628 Research & Development 8 3 Medical 1 2068 ... 1 80 0 6 3 4 4 3 1 2

5 rows × 35 columns

In [ ]:
data.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 1470 entries, 0 to 1469
Data columns (total 35 columns):
 #   Column                    Non-Null Count  Dtype 
---  ------                    --------------  ----- 
 0   Age                       1470 non-null   int64 
 1   Attrition                 1470 non-null   object
 2   BusinessTravel            1470 non-null   object
 3   DailyRate                 1470 non-null   int64 
 4   Department                1470 non-null   object
 5   DistanceFromHome          1470 non-null   int64 
 6   Education                 1470 non-null   int64 
 7   EducationField            1470 non-null   object
 8   EmployeeCount             1470 non-null   int64 
 9   EmployeeNumber            1470 non-null   int64 
 10  EnvironmentSatisfaction   1470 non-null   int64 
 11  Gender                    1470 non-null   object
 12  HourlyRate                1470 non-null   int64 
 13  JobInvolvement            1470 non-null   int64 
 14  JobLevel                  1470 non-null   int64 
 15  JobRole                   1470 non-null   object
 16  JobSatisfaction           1470 non-null   int64 
 17  MaritalStatus             1470 non-null   object
 18  MonthlyIncome             1470 non-null   int64 
 19  MonthlyRate               1470 non-null   int64 
 20  NumCompaniesWorked        1470 non-null   int64 
 21  Over18                    1470 non-null   object
 22  OverTime                  1470 non-null   object
 23  PercentSalaryHike         1470 non-null   int64 
 24  PerformanceRating         1470 non-null   int64 
 25  RelationshipSatisfaction  1470 non-null   int64 
 26  StandardHours             1470 non-null   int64 
 27  StockOptionLevel          1470 non-null   int64 
 28  TotalWorkingYears         1470 non-null   int64 
 29  TrainingTimesLastYear     1470 non-null   int64 
 30  WorkLifeBalance           1470 non-null   int64 
 31  YearsAtCompany            1470 non-null   int64 
 32  YearsInCurrentRole        1470 non-null   int64 
 33  YearsSinceLastPromotion   1470 non-null   int64 
 34  YearsWithCurrManager      1470 non-null   int64 
dtypes: int64(26), object(9)
memory usage: 402.1+ KB
In [ ]:
data.describe()
Out[ ]:
Age DailyRate DistanceFromHome Education EmployeeCount EmployeeNumber EnvironmentSatisfaction HourlyRate JobInvolvement JobLevel ... RelationshipSatisfaction StandardHours StockOptionLevel TotalWorkingYears TrainingTimesLastYear WorkLifeBalance YearsAtCompany YearsInCurrentRole YearsSinceLastPromotion YearsWithCurrManager
count 1470.000000 1470.000000 1470.000000 1470.000000 1470.0 1470.000000 1470.000000 1470.000000 1470.000000 1470.000000 ... 1470.000000 1470.0 1470.000000 1470.000000 1470.000000 1470.000000 1470.000000 1470.000000 1470.000000 1470.000000
mean 36.923810 802.485714 9.192517 2.912925 1.0 1024.865306 2.721769 65.891156 2.729932 2.063946 ... 2.712245 80.0 0.793878 11.279592 2.799320 2.761224 7.008163 4.229252 2.187755 4.123129
std 9.135373 403.509100 8.106864 1.024165 0.0 602.024335 1.093082 20.329428 0.711561 1.106940 ... 1.081209 0.0 0.852077 7.780782 1.289271 0.706476 6.126525 3.623137 3.222430 3.568136
min 18.000000 102.000000 1.000000 1.000000 1.0 1.000000 1.000000 30.000000 1.000000 1.000000 ... 1.000000 80.0 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000
25% 30.000000 465.000000 2.000000 2.000000 1.0 491.250000 2.000000 48.000000 2.000000 1.000000 ... 2.000000 80.0 0.000000 6.000000 2.000000 2.000000 3.000000 2.000000 0.000000 2.000000
50% 36.000000 802.000000 7.000000 3.000000 1.0 1020.500000 3.000000 66.000000 3.000000 2.000000 ... 3.000000 80.0 1.000000 10.000000 3.000000 3.000000 5.000000 3.000000 1.000000 3.000000
75% 43.000000 1157.000000 14.000000 4.000000 1.0 1555.750000 4.000000 83.750000 3.000000 3.000000 ... 4.000000 80.0 1.000000 15.000000 3.000000 3.000000 9.000000 7.000000 3.000000 7.000000
max 60.000000 1499.000000 29.000000 5.000000 1.0 2068.000000 4.000000 100.000000 4.000000 5.000000 ... 4.000000 80.0 3.000000 40.000000 6.000000 4.000000 40.000000 18.000000 15.000000 17.000000

8 rows × 26 columns

In [ ]:
data.isnull().sum()
Out[ ]:
Age                         0
Attrition                   0
BusinessTravel              0
DailyRate                   0
Department                  0
DistanceFromHome            0
Education                   0
EducationField              0
EmployeeCount               0
EmployeeNumber              0
EnvironmentSatisfaction     0
Gender                      0
HourlyRate                  0
JobInvolvement              0
JobLevel                    0
JobRole                     0
JobSatisfaction             0
MaritalStatus               0
MonthlyIncome               0
MonthlyRate                 0
NumCompaniesWorked          0
Over18                      0
OverTime                    0
PercentSalaryHike           0
PerformanceRating           0
RelationshipSatisfaction    0
StandardHours               0
StockOptionLevel            0
TotalWorkingYears           0
TrainingTimesLastYear       0
WorkLifeBalance             0
YearsAtCompany              0
YearsInCurrentRole          0
YearsSinceLastPromotion     0
YearsWithCurrManager        0
dtype: int64
In [ ]:
cor = data.corr()
<ipython-input-8-06847dd9a2e1>:1: FutureWarning: The default value of numeric_only in DataFrame.corr is deprecated. In a future version, it will default to False. Select only valid columns or specify the value of numeric_only to silence this warning.
  cor = data.corr()
In [ ]:
fig, ax = plt.subplots(figsize=(25,25))
sns.heatmap(cor, annot=True)
Out[ ]:
<Axes: >
In [11]:
sns.pairplot(data)
Out[11]:
<seaborn.axisgrid.PairGrid at 0x7bcdd83535e0>
In [12]:
from sklearn.preprocessing import LabelEncoder
In [13]:
le=LabelEncoder()
In [14]:
data["BusinessTravel"]=le.fit_transform(data["BusinessTravel"])
In [15]:
data["Department"]=le.fit_transform(data["Department"])
In [17]:
data["EducationField"]=le.fit_transform(data["EducationField"])
In [16]:
data["Gender"]=le.fit_transform(data["Gender"])
In [18]:
data["JobRole"]=le.fit_transform(data["JobRole"])
In [19]:
data["MaritalStatus"]=le.fit_transform(data["MaritalStatus"])
In [20]:
data["Over18"]=le.fit_transform(data["Over18"])
In [21]:
data["OverTime"]=le.fit_transform(data["OverTime"])
In [22]:
data.head()
Out[22]:
Age Attrition BusinessTravel DailyRate Department DistanceFromHome Education EducationField EmployeeCount EmployeeNumber ... RelationshipSatisfaction StandardHours StockOptionLevel TotalWorkingYears TrainingTimesLastYear WorkLifeBalance YearsAtCompany YearsInCurrentRole YearsSinceLastPromotion YearsWithCurrManager
0 41 Yes 2 1102 2 1 2 1 1 1 ... 1 80 0 8 0 1 6 4 0 5
1 49 No 1 279 1 8 1 1 1 2 ... 4 80 1 10 3 3 10 7 1 7
2 37 Yes 2 1373 1 2 2 4 1 4 ... 2 80 0 7 3 3 0 0 0 0
3 33 No 1 1392 1 3 4 1 1 5 ... 3 80 0 8 3 3 8 7 3 0
4 27 No 2 591 1 2 1 3 1 7 ... 4 80 1 6 3 3 2 2 2 2

5 rows × 35 columns

In [23]:
data.tail()
Out[23]:
Age Attrition BusinessTravel DailyRate Department DistanceFromHome Education EducationField EmployeeCount EmployeeNumber ... RelationshipSatisfaction StandardHours StockOptionLevel TotalWorkingYears TrainingTimesLastYear WorkLifeBalance YearsAtCompany YearsInCurrentRole YearsSinceLastPromotion YearsWithCurrManager
1465 36 No 1 884 1 23 2 3 1 2061 ... 3 80 1 17 3 3 5 2 0 3
1466 39 No 2 613 1 6 1 3 1 2062 ... 1 80 1 9 5 3 7 7 1 7
1467 27 No 2 155 1 4 3 1 1 2064 ... 2 80 1 6 0 3 6 2 0 3
1468 49 No 1 1023 2 2 3 3 1 2065 ... 4 80 0 17 3 2 9 6 0 8
1469 34 No 2 628 1 8 3 3 1 2068 ... 1 80 0 6 3 4 4 3 1 2

5 rows × 35 columns

In [24]:
X=data.drop(columns=["EmployeeNumber","EmployeeCount","StandardHours","Attrition","Over18"],axis=1)
In [25]:
y=data["Attrition"]
In [26]:
from sklearn.preprocessing import MinMaxScaler
ms=MinMaxScaler()
In [27]:
X_Scaled=ms.fit_transform(X)
In [28]:
cor=data.corr()
<ipython-input-28-410fe4458127>:1: FutureWarning: The default value of numeric_only in DataFrame.corr is deprecated. In a future version, it will default to False. Select only valid columns or specify the value of numeric_only to silence this warning.
  cor=data.corr()
In [29]:
fig, ax = plt.subplots(figsize=(30,30))
sns.heatmap(cor, annot=True)
Out[29]:
<Axes: >
In [30]:
from sklearn.model_selection import train_test_split
x_train,x_test,y_train,y_test = train_test_split(X_Scaled,y,test_size =0.2,random_state =0)
In [31]:
from sklearn.linear_model import LogisticRegression
classifier = LogisticRegression(random_state=0)
classifier.fit(x_train,y_train)
Out[31]:
LogisticRegression(random_state=0)
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
LogisticRegression(random_state=0)
In [32]:
from sklearn.metrics import accuracy_score,confusion_matrix
y_pred = classifier.predict(x_test)
cm = confusion_matrix(y_test, y_pred)
print(cm)
accuracy_score(y_test, y_pred)*100
[[242   3]
 [ 32  17]]
Out[32]:
88.09523809523809
In [33]:
from sklearn.metrics import accuracy_score,confusion_matrix,classification_report,roc_auc_score,roc_curve
In [34]:
print(classification_report(y_test,y_pred))
              precision    recall  f1-score   support

          No       0.88      0.99      0.93       245
         Yes       0.85      0.35      0.49        49

    accuracy                           0.88       294
   macro avg       0.87      0.67      0.71       294
weighted avg       0.88      0.88      0.86       294

In [35]:
from sklearn.tree import DecisionTreeClassifier
dtc=DecisionTreeClassifier()
In [36]:
dtc.fit(x_train,y_train)
Out[36]:
DecisionTreeClassifier()
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
DecisionTreeClassifier()
In [37]:
from sklearn.metrics import accuracy_score,confusion_matrix
y_pred = dtc.predict(x_test)
cm = confusion_matrix(y_test, y_pred)
print(cm)
accuracy_score(y_test, y_pred)*100
[[205  40]
 [ 34  15]]
Out[37]:
74.82993197278913
In [38]:
from sklearn import tree
plt.figure(figsize=(25,15))
tree.plot_tree(dtc,filled=True)
Out[38]:
[Text(0.319423577724359, 0.9722222222222222, 'x[23] <= 0.038\ngini = 0.269\nsamples = 1176\nvalue = [988, 188]'),
 Text(0.07692307692307693, 0.9166666666666666, 'x[14] <= 0.75\ngini = 0.5\nsamples = 78\nvalue = [39, 39]'),
 Text(0.04807692307692308, 0.8611111111111112, 'x[4] <= 0.554\ngini = 0.426\nsamples = 39\nvalue = [27, 12]'),
 Text(0.03205128205128205, 0.8055555555555556, 'x[13] <= 0.167\ngini = 0.312\nsamples = 31\nvalue = [25, 6]'),
 Text(0.019230769230769232, 0.75, 'x[18] <= 0.5\ngini = 0.49\nsamples = 7\nvalue = [3, 4]'),
 Text(0.01282051282051282, 0.6944444444444444, 'x[2] <= 0.298\ngini = 0.375\nsamples = 4\nvalue = [3, 1]'),
 Text(0.00641025641025641, 0.6388888888888888, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.019230769230769232, 0.6388888888888888, 'gini = 0.0\nsamples = 3\nvalue = [3, 0]'),
 Text(0.02564102564102564, 0.6944444444444444, 'gini = 0.0\nsamples = 3\nvalue = [0, 3]'),
 Text(0.04487179487179487, 0.75, 'x[17] <= 0.056\ngini = 0.153\nsamples = 24\nvalue = [22, 2]'),
 Text(0.038461538461538464, 0.6944444444444444, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.05128205128205128, 0.6944444444444444, 'x[7] <= 0.167\ngini = 0.083\nsamples = 23\nvalue = [22, 1]'),
 Text(0.04487179487179487, 0.6388888888888888, 'x[13] <= 0.667\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.038461538461538464, 0.5833333333333334, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.05128205128205128, 0.5833333333333334, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.057692307692307696, 0.6388888888888888, 'gini = 0.0\nsamples = 21\nvalue = [21, 0]'),
 Text(0.0641025641025641, 0.8055555555555556, 'x[19] <= 0.679\ngini = 0.375\nsamples = 8\nvalue = [2, 6]'),
 Text(0.057692307692307696, 0.75, 'gini = 0.0\nsamples = 6\nvalue = [0, 6]'),
 Text(0.07051282051282051, 0.75, 'gini = 0.0\nsamples = 2\nvalue = [2, 0]'),
 Text(0.10576923076923077, 0.8611111111111112, 'x[9] <= 0.364\ngini = 0.426\nsamples = 39\nvalue = [12, 27]'),
 Text(0.08974358974358974, 0.8055555555555556, 'x[15] <= 0.1\ngini = 0.133\nsamples = 14\nvalue = [1, 13]'),
 Text(0.08333333333333333, 0.75, 'gini = 0.0\nsamples = 13\nvalue = [0, 13]'),
 Text(0.09615384615384616, 0.75, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.12179487179487179, 0.8055555555555556, 'x[18] <= 0.5\ngini = 0.493\nsamples = 25\nvalue = [11, 14]'),
 Text(0.10897435897435898, 0.75, 'x[2] <= 0.106\ngini = 0.484\nsamples = 17\nvalue = [10, 7]'),
 Text(0.10256410256410256, 0.6944444444444444, 'gini = 0.0\nsamples = 3\nvalue = [0, 3]'),
 Text(0.11538461538461539, 0.6944444444444444, 'x[21] <= 0.167\ngini = 0.408\nsamples = 14\nvalue = [10, 4]'),
 Text(0.10256410256410256, 0.6388888888888888, 'x[0] <= 0.012\ngini = 0.375\nsamples = 4\nvalue = [1, 3]'),
 Text(0.09615384615384616, 0.5833333333333334, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.10897435897435898, 0.5833333333333334, 'gini = 0.0\nsamples = 3\nvalue = [0, 3]'),
 Text(0.1282051282051282, 0.6388888888888888, 'x[25] <= 0.5\ngini = 0.18\nsamples = 10\nvalue = [9, 1]'),
 Text(0.12179487179487179, 0.5833333333333334, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.1346153846153846, 0.5833333333333334, 'gini = 0.0\nsamples = 9\nvalue = [9, 0]'),
 Text(0.1346153846153846, 0.75, 'x[4] <= 0.839\ngini = 0.219\nsamples = 8\nvalue = [1, 7]'),
 Text(0.1282051282051282, 0.6944444444444444, 'gini = 0.0\nsamples = 7\nvalue = [0, 7]'),
 Text(0.14102564102564102, 0.6944444444444444, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.5619240785256411, 0.9166666666666666, 'x[18] <= 0.5\ngini = 0.235\nsamples = 1098\nvalue = [949, 149]'),
 Text(0.3117487980769231, 0.8611111111111112, 'x[25] <= 0.167\ngini = 0.162\nsamples = 798\nvalue = [727, 71]'),
 Text(0.18269230769230768, 0.8055555555555556, 'x[2] <= 0.747\ngini = 0.38\nsamples = 47\nvalue = [35, 12]'),
 Text(0.1762820512820513, 0.75, 'x[10] <= 0.5\ngini = 0.463\nsamples = 33\nvalue = [21, 12]'),
 Text(0.15384615384615385, 0.6944444444444444, 'x[4] <= 0.446\ngini = 0.42\nsamples = 10\nvalue = [3, 7]'),
 Text(0.14743589743589744, 0.6388888888888888, 'gini = 0.0\nsamples = 6\nvalue = [0, 6]'),
 Text(0.16025641025641027, 0.6388888888888888, 'x[0] <= 0.298\ngini = 0.375\nsamples = 4\nvalue = [3, 1]'),
 Text(0.15384615384615385, 0.5833333333333334, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.16666666666666666, 0.5833333333333334, 'gini = 0.0\nsamples = 3\nvalue = [3, 0]'),
 Text(0.1987179487179487, 0.6944444444444444, 'x[24] <= 0.583\ngini = 0.34\nsamples = 23\nvalue = [18, 5]'),
 Text(0.1858974358974359, 0.6388888888888888, 'x[28] <= 0.333\ngini = 0.117\nsamples = 16\nvalue = [15, 1]'),
 Text(0.1794871794871795, 0.5833333333333334, 'gini = 0.0\nsamples = 15\nvalue = [15, 0]'),
 Text(0.19230769230769232, 0.5833333333333334, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.21153846153846154, 0.6388888888888888, 'x[26] <= 0.287\ngini = 0.49\nsamples = 7\nvalue = [3, 4]'),
 Text(0.20512820512820512, 0.5833333333333334, 'gini = 0.0\nsamples = 4\nvalue = [0, 4]'),
 Text(0.21794871794871795, 0.5833333333333334, 'gini = 0.0\nsamples = 3\nvalue = [3, 0]'),
 Text(0.1891025641025641, 0.75, 'gini = 0.0\nsamples = 14\nvalue = [14, 0]'),
 Text(0.44080528846153844, 0.8055555555555556, 'x[23] <= 0.975\ngini = 0.145\nsamples = 751\nvalue = [692, 59]'),
 Text(0.43439503205128205, 0.75, 'x[26] <= 0.113\ngini = 0.143\nsamples = 750\nvalue = [692, 58]'),
 Text(0.3060897435897436, 0.6944444444444444, 'x[7] <= 0.167\ngini = 0.218\nsamples = 257\nvalue = [225, 32]'),
 Text(0.2516025641025641, 0.6388888888888888, 'x[29] <= 0.147\ngini = 0.355\nsamples = 65\nvalue = [50, 15]'),
 Text(0.23076923076923078, 0.5833333333333334, 'x[29] <= 0.029\ngini = 0.303\nsamples = 59\nvalue = [48, 11]'),
 Text(0.20833333333333334, 0.5277777777777778, 'x[10] <= 0.5\ngini = 0.463\nsamples = 22\nvalue = [14, 8]'),
 Text(0.1955128205128205, 0.4722222222222222, 'x[9] <= 0.179\ngini = 0.198\nsamples = 9\nvalue = [8, 1]'),
 Text(0.1891025641025641, 0.4166666666666667, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.20192307692307693, 0.4166666666666667, 'gini = 0.0\nsamples = 8\nvalue = [8, 0]'),
 Text(0.22115384615384615, 0.4722222222222222, 'x[9] <= 0.4\ngini = 0.497\nsamples = 13\nvalue = [6, 7]'),
 Text(0.21474358974358973, 0.4166666666666667, 'gini = 0.0\nsamples = 4\nvalue = [4, 0]'),
 Text(0.22756410256410256, 0.4166666666666667, 'x[4] <= 0.286\ngini = 0.346\nsamples = 9\nvalue = [2, 7]'),
 Text(0.22115384615384615, 0.3611111111111111, 'x[9] <= 0.629\ngini = 0.444\nsamples = 3\nvalue = [2, 1]'),
 Text(0.21474358974358973, 0.3055555555555556, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.22756410256410256, 0.3055555555555556, 'gini = 0.0\nsamples = 2\nvalue = [2, 0]'),
 Text(0.23397435897435898, 0.3611111111111111, 'gini = 0.0\nsamples = 6\nvalue = [0, 6]'),
 Text(0.2532051282051282, 0.5277777777777778, 'x[13] <= 0.167\ngini = 0.149\nsamples = 37\nvalue = [34, 3]'),
 Text(0.2467948717948718, 0.4722222222222222, 'x[26] <= 0.088\ngini = 0.5\nsamples = 6\nvalue = [3, 3]'),
 Text(0.2403846153846154, 0.4166666666666667, 'gini = 0.0\nsamples = 3\nvalue = [0, 3]'),
 Text(0.2532051282051282, 0.4166666666666667, 'gini = 0.0\nsamples = 3\nvalue = [3, 0]'),
 Text(0.25961538461538464, 0.4722222222222222, 'gini = 0.0\nsamples = 31\nvalue = [31, 0]'),
 Text(0.2724358974358974, 0.5833333333333334, 'x[10] <= 0.167\ngini = 0.444\nsamples = 6\nvalue = [2, 4]'),
 Text(0.266025641025641, 0.5277777777777778, 'gini = 0.0\nsamples = 3\nvalue = [0, 3]'),
 Text(0.27884615384615385, 0.5277777777777778, 'x[13] <= 0.333\ngini = 0.444\nsamples = 3\nvalue = [2, 1]'),
 Text(0.2724358974358974, 0.4722222222222222, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.28525641025641024, 0.4722222222222222, 'gini = 0.0\nsamples = 2\nvalue = [2, 0]'),
 Text(0.3605769230769231, 0.6388888888888888, 'x[0] <= 0.321\ngini = 0.161\nsamples = 192\nvalue = [175, 17]'),
 Text(0.3076923076923077, 0.5833333333333334, 'x[6] <= 0.1\ngini = 0.294\nsamples = 67\nvalue = [55, 12]'),
 Text(0.30128205128205127, 0.5277777777777778, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.3141025641025641, 0.5277777777777778, 'x[25] <= 0.5\ngini = 0.26\nsamples = 65\nvalue = [55, 10]'),
 Text(0.2980769230769231, 0.4722222222222222, 'x[9] <= 0.679\ngini = 0.469\nsamples = 16\nvalue = [10, 6]'),
 Text(0.2916666666666667, 0.4166666666666667, 'x[6] <= 0.4\ngini = 0.444\nsamples = 9\nvalue = [3, 6]'),
 Text(0.28525641025641024, 0.3611111111111111, 'gini = 0.0\nsamples = 2\nvalue = [2, 0]'),
 Text(0.2980769230769231, 0.3611111111111111, 'x[4] <= 0.018\ngini = 0.245\nsamples = 7\nvalue = [1, 6]'),
 Text(0.2916666666666667, 0.3055555555555556, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.30448717948717946, 0.3055555555555556, 'gini = 0.0\nsamples = 6\nvalue = [0, 6]'),
 Text(0.30448717948717946, 0.4166666666666667, 'gini = 0.0\nsamples = 7\nvalue = [7, 0]'),
 Text(0.3301282051282051, 0.4722222222222222, 'x[2] <= 0.037\ngini = 0.15\nsamples = 49\nvalue = [45, 4]'),
 Text(0.32371794871794873, 0.4166666666666667, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.33653846153846156, 0.4166666666666667, 'x[2] <= 0.938\ngini = 0.117\nsamples = 48\nvalue = [45, 3]'),
 Text(0.3301282051282051, 0.3611111111111111, 'x[5] <= 0.875\ngini = 0.081\nsamples = 47\nvalue = [45, 2]'),
 Text(0.3173076923076923, 0.3055555555555556, 'x[10] <= 0.167\ngini = 0.043\nsamples = 45\nvalue = [44, 1]'),
 Text(0.3108974358974359, 0.25, 'x[13] <= 0.5\ngini = 0.444\nsamples = 3\nvalue = [2, 1]'),
 Text(0.30448717948717946, 0.19444444444444445, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.3173076923076923, 0.19444444444444445, 'gini = 0.0\nsamples = 2\nvalue = [2, 0]'),
 Text(0.32371794871794873, 0.25, 'gini = 0.0\nsamples = 42\nvalue = [42, 0]'),
 Text(0.34294871794871795, 0.3055555555555556, 'x[19] <= 0.393\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.33653846153846156, 0.25, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.34935897435897434, 0.25, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.34294871794871795, 0.3611111111111111, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.41346153846153844, 0.5833333333333334, 'x[6] <= 0.9\ngini = 0.077\nsamples = 125\nvalue = [120, 5]'),
 Text(0.40064102564102566, 0.5277777777777778, 'x[0] <= 0.393\ngini = 0.05\nsamples = 118\nvalue = [115, 3]'),
 Text(0.3942307692307692, 0.4722222222222222, 'x[2] <= 0.956\ngini = 0.185\nsamples = 29\nvalue = [26, 3]'),
 Text(0.38782051282051283, 0.4166666666666667, 'x[29] <= 0.147\ngini = 0.133\nsamples = 28\nvalue = [26, 2]'),
 Text(0.375, 0.3611111111111111, 'x[10] <= 0.167\ngini = 0.074\nsamples = 26\nvalue = [25, 1]'),
 Text(0.3685897435897436, 0.3055555555555556, 'x[15] <= 0.168\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.36217948717948717, 0.25, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.375, 0.25, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.3814102564102564, 0.3055555555555556, 'gini = 0.0\nsamples = 24\nvalue = [24, 0]'),
 Text(0.40064102564102566, 0.3611111111111111, 'x[27] <= 0.139\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.3942307692307692, 0.3055555555555556, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.40705128205128205, 0.3055555555555556, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.40064102564102566, 0.4166666666666667, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.40705128205128205, 0.4722222222222222, 'gini = 0.0\nsamples = 89\nvalue = [89, 0]'),
 Text(0.42628205128205127, 0.5277777777777778, 'x[9] <= 0.514\ngini = 0.408\nsamples = 7\nvalue = [5, 2]'),
 Text(0.4198717948717949, 0.4722222222222222, 'x[17] <= 0.278\ngini = 0.444\nsamples = 3\nvalue = [1, 2]'),
 Text(0.41346153846153844, 0.4166666666666667, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.42628205128205127, 0.4166666666666667, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.4326923076923077, 0.4722222222222222, 'gini = 0.0\nsamples = 4\nvalue = [4, 0]'),
 Text(0.5627003205128205, 0.6944444444444444, 'x[26] <= 0.787\ngini = 0.1\nsamples = 493\nvalue = [467, 26]'),
 Text(0.5292467948717948, 0.6388888888888888, 'x[13] <= 0.5\ngini = 0.094\nsamples = 486\nvalue = [462, 24]'),
 Text(0.48157051282051283, 0.5833333333333334, 'x[12] <= 0.938\ngini = 0.154\nsamples = 191\nvalue = [175, 16]'),
 Text(0.4751602564102564, 0.5277777777777778, 'x[16] <= 0.481\ngini = 0.145\nsamples = 190\nvalue = [175, 15]'),
 Text(0.4567307692307692, 0.4722222222222222, 'x[29] <= 0.794\ngini = 0.221\nsamples = 95\nvalue = [83, 12]'),
 Text(0.45032051282051283, 0.4166666666666667, 'x[16] <= 0.47\ngini = 0.207\nsamples = 94\nvalue = [83, 11]'),
 Text(0.4439102564102564, 0.3611111111111111, 'x[5] <= 0.375\ngini = 0.192\nsamples = 93\nvalue = [83, 10]'),
 Text(0.4198717948717949, 0.3055555555555556, 'x[6] <= 0.9\ngini = 0.363\nsamples = 21\nvalue = [16, 5]'),
 Text(0.41346153846153844, 0.25, 'x[15] <= 0.413\ngini = 0.266\nsamples = 19\nvalue = [16, 3]'),
 Text(0.40064102564102566, 0.19444444444444445, 'x[15] <= 0.141\ngini = 0.117\nsamples = 16\nvalue = [15, 1]'),
 Text(0.3942307692307692, 0.1388888888888889, 'x[9] <= 0.729\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.38782051282051283, 0.08333333333333333, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.40064102564102566, 0.08333333333333333, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.40705128205128205, 0.1388888888888889, 'gini = 0.0\nsamples = 14\nvalue = [14, 0]'),
 Text(0.42628205128205127, 0.19444444444444445, 'x[16] <= 0.006\ngini = 0.444\nsamples = 3\nvalue = [1, 2]'),
 Text(0.4198717948717949, 0.1388888888888889, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.4326923076923077, 0.1388888888888889, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.42628205128205127, 0.25, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.46794871794871795, 0.3055555555555556, 'x[27] <= 0.139\ngini = 0.129\nsamples = 72\nvalue = [67, 5]'),
 Text(0.44551282051282054, 0.25, 'x[29] <= 0.206\ngini = 0.444\nsamples = 6\nvalue = [4, 2]'),
 Text(0.4391025641025641, 0.19444444444444445, 'gini = 0.0\nsamples = 3\nvalue = [3, 0]'),
 Text(0.4519230769230769, 0.19444444444444445, 'x[26] <= 0.188\ngini = 0.444\nsamples = 3\nvalue = [1, 2]'),
 Text(0.44551282051282054, 0.1388888888888889, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.4583333333333333, 0.1388888888888889, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.49038461538461536, 0.25, 'x[2] <= 0.958\ngini = 0.087\nsamples = 66\nvalue = [63, 3]'),
 Text(0.4775641025641026, 0.19444444444444445, 'x[24] <= 0.583\ngini = 0.061\nsamples = 64\nvalue = [62, 2]'),
 Text(0.47115384615384615, 0.1388888888888889, 'gini = 0.0\nsamples = 52\nvalue = [52, 0]'),
 Text(0.483974358974359, 0.1388888888888889, 'x[12] <= 0.812\ngini = 0.278\nsamples = 12\nvalue = [10, 2]'),
 Text(0.4775641025641026, 0.08333333333333333, 'gini = 0.0\nsamples = 9\nvalue = [9, 0]'),
 Text(0.49038461538461536, 0.08333333333333333, 'x[2] <= 0.525\ngini = 0.444\nsamples = 3\nvalue = [1, 2]'),
 Text(0.483974358974359, 0.027777777777777776, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.4967948717948718, 0.027777777777777776, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.5032051282051282, 0.19444444444444445, 'x[15] <= 0.413\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.4967948717948718, 0.1388888888888889, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.5096153846153846, 0.1388888888888889, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.4567307692307692, 0.3611111111111111, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.46314102564102566, 0.4166666666666667, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.4935897435897436, 0.4722222222222222, 'x[17] <= 0.5\ngini = 0.061\nsamples = 95\nvalue = [92, 3]'),
 Text(0.48717948717948717, 0.4166666666666667, 'gini = 0.0\nsamples = 76\nvalue = [76, 0]'),
 Text(0.5, 0.4166666666666667, 'x[29] <= 0.088\ngini = 0.266\nsamples = 19\nvalue = [16, 3]'),
 Text(0.48717948717948717, 0.3611111111111111, 'x[4] <= 0.268\ngini = 0.444\nsamples = 3\nvalue = [1, 2]'),
 Text(0.4807692307692308, 0.3055555555555556, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.4935897435897436, 0.3055555555555556, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.5128205128205128, 0.3611111111111111, 'x[15] <= 0.108\ngini = 0.117\nsamples = 16\nvalue = [15, 1]'),
 Text(0.5064102564102564, 0.3055555555555556, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.5192307692307693, 0.3055555555555556, 'gini = 0.0\nsamples = 15\nvalue = [15, 0]'),
 Text(0.4879807692307692, 0.5277777777777778, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.5769230769230769, 0.5833333333333334, 'x[19] <= 0.036\ngini = 0.053\nsamples = 295\nvalue = [287, 8]'),
 Text(0.5544871794871795, 0.5277777777777778, 'x[28] <= 0.7\ngini = 0.159\nsamples = 46\nvalue = [42, 4]'),
 Text(0.5480769230769231, 0.4722222222222222, 'x[9] <= 0.071\ngini = 0.124\nsamples = 45\nvalue = [42, 3]'),
 Text(0.532051282051282, 0.4166666666666667, 'x[23] <= 0.287\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.5256410256410257, 0.3611111111111111, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.5384615384615384, 0.3611111111111111, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.5641025641025641, 0.4166666666666667, 'x[23] <= 0.688\ngini = 0.089\nsamples = 43\nvalue = [41, 2]'),
 Text(0.5512820512820513, 0.3611111111111111, 'x[12] <= 0.062\ngini = 0.048\nsamples = 41\nvalue = [40, 1]'),
 Text(0.5448717948717948, 0.3055555555555556, 'x[0] <= 0.595\ngini = 0.375\nsamples = 4\nvalue = [3, 1]'),
 Text(0.5384615384615384, 0.25, 'gini = 0.0\nsamples = 3\nvalue = [3, 0]'),
 Text(0.5512820512820513, 0.25, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.5576923076923077, 0.3055555555555556, 'gini = 0.0\nsamples = 37\nvalue = [37, 0]'),
 Text(0.5769230769230769, 0.3611111111111111, 'x[21] <= 0.333\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.5705128205128205, 0.3055555555555556, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.5833333333333334, 0.3055555555555556, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.5608974358974359, 0.4722222222222222, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.5993589743589743, 0.5277777777777778, 'x[15] <= 0.056\ngini = 0.032\nsamples = 249\nvalue = [245, 4]'),
 Text(0.5833333333333334, 0.4722222222222222, 'x[8] <= 0.5\ngini = 0.32\nsamples = 5\nvalue = [4, 1]'),
 Text(0.5769230769230769, 0.4166666666666667, 'gini = 0.0\nsamples = 4\nvalue = [4, 0]'),
 Text(0.5897435897435898, 0.4166666666666667, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.6153846153846154, 0.4722222222222222, 'x[2] <= 0.015\ngini = 0.024\nsamples = 244\nvalue = [241, 3]'),
 Text(0.6025641025641025, 0.4166666666666667, 'x[2] <= 0.013\ngini = 0.278\nsamples = 6\nvalue = [5, 1]'),
 Text(0.5961538461538461, 0.3611111111111111, 'gini = 0.0\nsamples = 5\nvalue = [5, 0]'),
 Text(0.6089743589743589, 0.3611111111111111, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.6282051282051282, 0.4166666666666667, 'x[21] <= 0.167\ngini = 0.017\nsamples = 238\nvalue = [236, 2]'),
 Text(0.6217948717948718, 0.3611111111111111, 'x[25] <= 0.833\ngini = 0.073\nsamples = 53\nvalue = [51, 2]'),
 Text(0.6089743589743589, 0.3055555555555556, 'x[29] <= 0.088\ngini = 0.041\nsamples = 48\nvalue = [47, 1]'),
 Text(0.6025641025641025, 0.25, 'x[0] <= 0.345\ngini = 0.245\nsamples = 7\nvalue = [6, 1]'),
 Text(0.5961538461538461, 0.19444444444444445, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.6089743589743589, 0.19444444444444445, 'gini = 0.0\nsamples = 6\nvalue = [6, 0]'),
 Text(0.6153846153846154, 0.25, 'gini = 0.0\nsamples = 41\nvalue = [41, 0]'),
 Text(0.6346153846153846, 0.3055555555555556, 'x[16] <= 0.216\ngini = 0.32\nsamples = 5\nvalue = [4, 1]'),
 Text(0.6282051282051282, 0.25, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.6410256410256411, 0.25, 'gini = 0.0\nsamples = 4\nvalue = [4, 0]'),
 Text(0.6346153846153846, 0.3611111111111111, 'gini = 0.0\nsamples = 185\nvalue = [185, 0]'),
 Text(0.5961538461538461, 0.6388888888888888, 'x[8] <= 0.5\ngini = 0.408\nsamples = 7\nvalue = [5, 2]'),
 Text(0.5897435897435898, 0.5833333333333334, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.6025641025641025, 0.5833333333333334, 'gini = 0.0\nsamples = 5\nvalue = [5, 0]'),
 Text(0.4472155448717949, 0.75, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.8120993589743589, 0.8611111111111112, 'x[15] <= 0.157\ngini = 0.385\nsamples = 300\nvalue = [222, 78]'),
 Text(0.7219551282051282, 0.8055555555555556, 'x[22] <= 0.167\ngini = 0.5\nsamples = 96\nvalue = [49, 47]'),
 Text(0.6891025641025641, 0.75, 'x[4] <= 0.161\ngini = 0.459\nsamples = 42\nvalue = [15, 27]'),
 Text(0.6666666666666666, 0.6944444444444444, 'x[16] <= 0.41\ngini = 0.499\nsamples = 23\nvalue = [12, 11]'),
 Text(0.6538461538461539, 0.6388888888888888, 'x[15] <= 0.061\ngini = 0.426\nsamples = 13\nvalue = [4, 9]'),
 Text(0.6474358974358975, 0.5833333333333334, 'gini = 0.0\nsamples = 2\nvalue = [2, 0]'),
 Text(0.6602564102564102, 0.5833333333333334, 'x[9] <= 0.993\ngini = 0.298\nsamples = 11\nvalue = [2, 9]'),
 Text(0.6538461538461539, 0.5277777777777778, 'x[0] <= 0.214\ngini = 0.18\nsamples = 10\nvalue = [1, 9]'),
 Text(0.6474358974358975, 0.4722222222222222, 'x[13] <= 0.667\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.6410256410256411, 0.4166666666666667, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.6538461538461539, 0.4166666666666667, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.6602564102564102, 0.4722222222222222, 'gini = 0.0\nsamples = 8\nvalue = [0, 8]'),
 Text(0.6666666666666666, 0.5277777777777778, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.6794871794871795, 0.6388888888888888, 'x[15] <= 0.108\ngini = 0.32\nsamples = 10\nvalue = [8, 2]'),
 Text(0.6730769230769231, 0.5833333333333334, 'gini = 0.0\nsamples = 7\nvalue = [7, 0]'),
 Text(0.6858974358974359, 0.5833333333333334, 'x[2] <= 0.544\ngini = 0.444\nsamples = 3\nvalue = [1, 2]'),
 Text(0.6794871794871795, 0.5277777777777778, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.6923076923076923, 0.5277777777777778, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.7115384615384616, 0.6944444444444444, 'x[11] <= 0.125\ngini = 0.266\nsamples = 19\nvalue = [3, 16]'),
 Text(0.7051282051282052, 0.6388888888888888, 'x[9] <= 0.2\ngini = 0.198\nsamples = 18\nvalue = [2, 16]'),
 Text(0.6987179487179487, 0.5833333333333334, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.7115384615384616, 0.5833333333333334, 'x[28] <= 0.433\ngini = 0.111\nsamples = 17\nvalue = [1, 16]'),
 Text(0.7051282051282052, 0.5277777777777778, 'gini = 0.0\nsamples = 15\nvalue = [0, 15]'),
 Text(0.717948717948718, 0.5277777777777778, 'x[2] <= 0.212\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.7115384615384616, 0.4722222222222222, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.7243589743589743, 0.4722222222222222, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.717948717948718, 0.6388888888888888, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.7548076923076923, 0.75, 'x[0] <= 0.202\ngini = 0.466\nsamples = 54\nvalue = [34, 20]'),
 Text(0.7371794871794872, 0.6944444444444444, 'x[0] <= 0.107\ngini = 0.245\nsamples = 7\nvalue = [1, 6]'),
 Text(0.7307692307692307, 0.6388888888888888, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.7435897435897436, 0.6388888888888888, 'gini = 0.0\nsamples = 6\nvalue = [0, 6]'),
 Text(0.7724358974358975, 0.6944444444444444, 'x[2] <= 0.622\ngini = 0.418\nsamples = 47\nvalue = [33, 14]'),
 Text(0.7564102564102564, 0.6388888888888888, 'x[2] <= 0.145\ngini = 0.482\nsamples = 32\nvalue = [19, 13]'),
 Text(0.7435897435897436, 0.5833333333333334, 'x[15] <= 0.068\ngini = 0.18\nsamples = 10\nvalue = [9, 1]'),
 Text(0.7371794871794872, 0.5277777777777778, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.75, 0.5277777777777778, 'gini = 0.0\nsamples = 9\nvalue = [9, 0]'),
 Text(0.7692307692307693, 0.5833333333333334, 'x[16] <= 0.87\ngini = 0.496\nsamples = 22\nvalue = [10, 12]'),
 Text(0.7628205128205128, 0.5277777777777778, 'x[25] <= 0.833\ngini = 0.465\nsamples = 19\nvalue = [7, 12]'),
 Text(0.7564102564102564, 0.4722222222222222, 'x[17] <= 0.167\ngini = 0.415\nsamples = 17\nvalue = [5, 12]'),
 Text(0.7435897435897436, 0.4166666666666667, 'x[19] <= 0.321\ngini = 0.49\nsamples = 7\nvalue = [4, 3]'),
 Text(0.7371794871794872, 0.3611111111111111, 'gini = 0.0\nsamples = 4\nvalue = [4, 0]'),
 Text(0.75, 0.3611111111111111, 'gini = 0.0\nsamples = 3\nvalue = [0, 3]'),
 Text(0.7692307692307693, 0.4166666666666667, 'x[12] <= 0.188\ngini = 0.18\nsamples = 10\nvalue = [1, 9]'),
 Text(0.7628205128205128, 0.3611111111111111, 'x[21] <= 0.5\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.7564102564102564, 0.3055555555555556, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.7692307692307693, 0.3055555555555556, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.7756410256410257, 0.3611111111111111, 'gini = 0.0\nsamples = 8\nvalue = [0, 8]'),
 Text(0.7692307692307693, 0.4722222222222222, 'gini = 0.0\nsamples = 2\nvalue = [2, 0]'),
 Text(0.7756410256410257, 0.5277777777777778, 'gini = 0.0\nsamples = 3\nvalue = [3, 0]'),
 Text(0.7884615384615384, 0.6388888888888888, 'x[9] <= 0.064\ngini = 0.124\nsamples = 15\nvalue = [14, 1]'),
 Text(0.782051282051282, 0.5833333333333334, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.7948717948717948, 0.5833333333333334, 'gini = 0.0\nsamples = 14\nvalue = [14, 0]'),
 Text(0.9022435897435898, 0.8055555555555556, 'x[14] <= 0.75\ngini = 0.258\nsamples = 204\nvalue = [173, 31]'),
 Text(0.8397435897435898, 0.75, 'x[15] <= 0.992\ngini = 0.138\nsamples = 147\nvalue = [136, 11]'),
 Text(0.8333333333333334, 0.6944444444444444, 'x[4] <= 0.482\ngini = 0.128\nsamples = 146\nvalue = [136, 10]'),
 Text(0.8141025641025641, 0.6388888888888888, 'x[26] <= 0.063\ngini = 0.038\nsamples = 104\nvalue = [102, 2]'),
 Text(0.8076923076923077, 0.5833333333333334, 'x[9] <= 0.193\ngini = 0.32\nsamples = 10\nvalue = [8, 2]'),
 Text(0.8012820512820513, 0.5277777777777778, 'x[2] <= 0.814\ngini = 0.444\nsamples = 3\nvalue = [1, 2]'),
 Text(0.7948717948717948, 0.4722222222222222, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.8076923076923077, 0.4722222222222222, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.8141025641025641, 0.5277777777777778, 'gini = 0.0\nsamples = 7\nvalue = [7, 0]'),
 Text(0.8205128205128205, 0.5833333333333334, 'gini = 0.0\nsamples = 94\nvalue = [94, 0]'),
 Text(0.8525641025641025, 0.6388888888888888, 'x[7] <= 0.167\ngini = 0.308\nsamples = 42\nvalue = [34, 8]'),
 Text(0.8333333333333334, 0.5833333333333334, 'x[2] <= 0.736\ngini = 0.375\nsamples = 4\nvalue = [1, 3]'),
 Text(0.8269230769230769, 0.5277777777777778, 'gini = 0.0\nsamples = 3\nvalue = [0, 3]'),
 Text(0.8397435897435898, 0.5277777777777778, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.8717948717948718, 0.5833333333333334, 'x[0] <= 0.393\ngini = 0.229\nsamples = 38\nvalue = [33, 5]'),
 Text(0.8525641025641025, 0.5277777777777778, 'x[1] <= 0.25\ngini = 0.5\nsamples = 6\nvalue = [3, 3]'),
 Text(0.8461538461538461, 0.4722222222222222, 'gini = 0.0\nsamples = 2\nvalue = [2, 0]'),
 Text(0.8589743589743589, 0.4722222222222222, 'x[26] <= 0.275\ngini = 0.375\nsamples = 4\nvalue = [1, 3]'),
 Text(0.8525641025641025, 0.4166666666666667, 'gini = 0.0\nsamples = 3\nvalue = [0, 3]'),
 Text(0.8653846153846154, 0.4166666666666667, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.8910256410256411, 0.5277777777777778, 'x[24] <= 0.917\ngini = 0.117\nsamples = 32\nvalue = [30, 2]'),
 Text(0.8846153846153846, 0.4722222222222222, 'x[12] <= 0.812\ngini = 0.062\nsamples = 31\nvalue = [30, 1]'),
 Text(0.8782051282051282, 0.4166666666666667, 'gini = 0.0\nsamples = 28\nvalue = [28, 0]'),
 Text(0.8910256410256411, 0.4166666666666667, 'x[21] <= 0.5\ngini = 0.444\nsamples = 3\nvalue = [2, 1]'),
 Text(0.8846153846153846, 0.3611111111111111, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.8974358974358975, 0.3611111111111111, 'gini = 0.0\nsamples = 2\nvalue = [2, 0]'),
 Text(0.8974358974358975, 0.4722222222222222, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.8461538461538461, 0.6944444444444444, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.9647435897435898, 0.75, 'x[12] <= 0.812\ngini = 0.456\nsamples = 57\nvalue = [37, 20]'),
 Text(0.9423076923076923, 0.6944444444444444, 'x[28] <= 0.4\ngini = 0.238\nsamples = 29\nvalue = [25, 4]'),
 Text(0.9294871794871795, 0.6388888888888888, 'x[9] <= 0.964\ngini = 0.142\nsamples = 26\nvalue = [24, 2]'),
 Text(0.9230769230769231, 0.5833333333333334, 'x[10] <= 0.167\ngini = 0.077\nsamples = 25\nvalue = [24, 1]'),
 Text(0.9166666666666666, 0.5277777777777778, 'x[1] <= 0.75\ngini = 0.5\nsamples = 2\nvalue = [1, 1]'),
 Text(0.9102564102564102, 0.4722222222222222, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.9230769230769231, 0.4722222222222222, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.9294871794871795, 0.5277777777777778, 'gini = 0.0\nsamples = 23\nvalue = [23, 0]'),
 Text(0.9358974358974359, 0.5833333333333334, 'gini = 0.0\nsamples = 1\nvalue = [0, 1]'),
 Text(0.9551282051282052, 0.6388888888888888, 'x[25] <= 0.833\ngini = 0.444\nsamples = 3\nvalue = [1, 2]'),
 Text(0.9487179487179487, 0.5833333333333334, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.9615384615384616, 0.5833333333333334, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.9871794871794872, 0.6944444444444444, 'x[28] <= 0.1\ngini = 0.49\nsamples = 28\nvalue = [12, 16]'),
 Text(0.9807692307692307, 0.6388888888888888, 'x[10] <= 0.833\ngini = 0.48\nsamples = 20\nvalue = [12, 8]'),
 Text(0.9743589743589743, 0.5833333333333334, 'x[4] <= 0.018\ngini = 0.415\nsamples = 17\nvalue = [12, 5]'),
 Text(0.967948717948718, 0.5277777777777778, 'gini = 0.0\nsamples = 2\nvalue = [0, 2]'),
 Text(0.9807692307692307, 0.5277777777777778, 'x[15] <= 0.365\ngini = 0.32\nsamples = 15\nvalue = [12, 3]'),
 Text(0.9743589743589743, 0.4722222222222222, 'gini = 0.0\nsamples = 11\nvalue = [11, 0]'),
 Text(0.9871794871794872, 0.4722222222222222, 'x[4] <= 0.179\ngini = 0.375\nsamples = 4\nvalue = [1, 3]'),
 Text(0.9807692307692307, 0.4166666666666667, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
 Text(0.9935897435897436, 0.4166666666666667, 'gini = 0.0\nsamples = 3\nvalue = [0, 3]'),
 Text(0.9871794871794872, 0.5833333333333334, 'gini = 0.0\nsamples = 3\nvalue = [0, 3]'),
 Text(0.9935897435897436, 0.6388888888888888, 'gini = 0.0\nsamples = 8\nvalue = [0, 8]')]
In [39]:
from sklearn.model_selection import GridSearchCV
parameter={
 'criterion':['gini','entropy'],
  'splitter':['best','random'],
  'max_depth':[1,2,3,4,5,6,7,8,9,10],
  'max_features':['auto', 'sqrt', 'log2']

}
In [40]:
grid_search=GridSearchCV(estimator=dtc,param_grid=parameter,cv=5,scoring="accuracy")
In [41]:
grid_search.fit(x_train,y_train)
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/tree/_classes.py:269: FutureWarning: `max_features='auto'` has been deprecated in 1.1 and will be removed in 1.3. To keep the past behaviour, explicitly set `max_features='sqrt'`.
  warnings.warn(
Out[41]:
GridSearchCV(cv=5, estimator=DecisionTreeClassifier(),
             param_grid={'criterion': ['gini', 'entropy'],
                         'max_depth': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
                         'max_features': ['auto', 'sqrt', 'log2'],
                         'splitter': ['best', 'random']},
             scoring='accuracy')
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
GridSearchCV(cv=5, estimator=DecisionTreeClassifier(),
             param_grid={'criterion': ['gini', 'entropy'],
                         'max_depth': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
                         'max_features': ['auto', 'sqrt', 'log2'],
                         'splitter': ['best', 'random']},
             scoring='accuracy')
DecisionTreeClassifier()
DecisionTreeClassifier()
In [42]:
grid_search.best_params_
Out[42]:
{'criterion': 'gini',
 'max_depth': 5,
 'max_features': 'log2',
 'splitter': 'best'}
In [43]:
dtc_cv=DecisionTreeClassifier(criterion= 'entropy',
 max_depth= 4,
 max_features= 'sqrt',
 splitter= 'best')
dtc_cv.fit(x_train,y_train)
Out[43]:
DecisionTreeClassifier(criterion='entropy', max_depth=4, max_features='sqrt')
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
DecisionTreeClassifier(criterion='entropy', max_depth=4, max_features='sqrt')
In [44]:
print(classification_report(y_test,y_pred))
              precision    recall  f1-score   support

          No       0.86      0.84      0.85       245
         Yes       0.27      0.31      0.29        49

    accuracy                           0.75       294
   macro avg       0.57      0.57      0.57       294
weighted avg       0.76      0.75      0.75       294

In [45]:
from sklearn.ensemble import RandomForestClassifier
classifier = RandomForestClassifier(n_estimators = 1000, criterion = 'entropy', random_state = 0)
classifier.fit(x_train, y_train)
Out[45]:
RandomForestClassifier(criterion='entropy', n_estimators=1000, random_state=0)
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
RandomForestClassifier(criterion='entropy', n_estimators=1000, random_state=0)
In [46]:
from sklearn.metrics import confusion_matrix, accuracy_score
y_pred = classifier.predict(x_test)
cm = confusion_matrix(y_test, y_pred)
print(cm)
accuracy_score(y_test, y_pred)
[[243   2]
 [ 41   8]]
Out[46]:
0.8537414965986394
In [47]:
from sklearn.ensemble import RandomForestClassifier
In [48]:
rfc=RandomForestClassifier()
In [49]:
forest_params = [{'max_depth': list(range(10, 15)), 'max_features': list(range(0,14))}]
In [50]:
rfc_cv=GridSearchCV(rfc,param_grid=forest_params,cv=10,scoring="accuracy")
In [51]:
rfc_cv.fit(x_train,y_train)
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_validation.py:378: FitFailedWarning: 
50 fits failed out of a total of 700.
The score on these train-test partitions for these parameters will be set to nan.
If these failures are not expected, you can try to debug them by setting error_score='raise'.

Below are more details about the failures:
--------------------------------------------------------------------------------
50 fits failed with the following error:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_validation.py", line 686, in _fit_and_score
    estimator.fit(X_train, y_train, **fit_params)
  File "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_forest.py", line 340, in fit
    self._validate_params()
  File "/usr/local/lib/python3.10/dist-packages/sklearn/base.py", line 600, in _validate_params
    validate_parameter_constraints(
  File "/usr/local/lib/python3.10/dist-packages/sklearn/utils/_param_validation.py", line 97, in validate_parameter_constraints
    raise InvalidParameterError(
sklearn.utils._param_validation.InvalidParameterError: The 'max_features' parameter of RandomForestClassifier must be an int in the range [1, inf), a float in the range (0.0, 1.0], a str among {'sqrt', 'auto' (deprecated), 'log2'} or None. Got 0 instead.

  warnings.warn(some_fits_failed_message, FitFailedWarning)
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_search.py:952: UserWarning: One or more of the test scores are non-finite: [       nan 0.84608866 0.85374475 0.85713458 0.85969144 0.86222657
 0.85881501 0.86053165 0.85880776 0.86562364 0.85712734 0.86050992
 0.86051717 0.86308851        nan 0.84950746 0.85628712 0.86052441
 0.85882949 0.86306678 0.86307403 0.85456323 0.85370853 0.86392873
 0.85627264 0.85885122 0.85882225 0.85625815        nan 0.84864552
 0.85544691 0.85714182 0.8596842  0.86137911 0.86136462 0.85966971
 0.85966247 0.85965522 0.85883674 0.86221932 0.85882225 0.85882225
        nan 0.84695784 0.8613936  0.86138635 0.85712009 0.86224105
 0.85967695 0.85882949 0.85798204 0.86137187 0.86394321 0.86479067
 0.85541793 0.86308127        nan 0.85204983 0.85883674 0.85629436
 0.85967695 0.85798928 0.86053165 0.85964798 0.86222657 0.85966971
 0.86137911 0.86647834 0.85627264 0.86135014]
  warnings.warn(
Out[51]:
GridSearchCV(cv=10, estimator=RandomForestClassifier(),
             param_grid=[{'max_depth': [10, 11, 12, 13, 14],
                          'max_features': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
                                           12, 13]}],
             scoring='accuracy')
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
GridSearchCV(cv=10, estimator=RandomForestClassifier(),
             param_grid=[{'max_depth': [10, 11, 12, 13, 14],
                          'max_features': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
                                           12, 13]}],
             scoring='accuracy')
RandomForestClassifier()
RandomForestClassifier()
In [52]:
print(classification_report(y_test,y_pred))
              precision    recall  f1-score   support

          No       0.86      0.99      0.92       245
         Yes       0.80      0.16      0.27        49

    accuracy                           0.85       294
   macro avg       0.83      0.58      0.59       294
weighted avg       0.85      0.85      0.81       294